package org.entities;

import org.GameState;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.geom.Rectangle;
import org.newdawn.slick.geom.Shape;

public abstract class Entity {

	GameState game;
	
	float x;
	float y;
	
	public Rectangle bounds;
	
	public Entity(GameState game, int x, int y, int width, int height) {
		this.game = game;
		
		this.x = x;
		this.y = y;
		
		bounds = new Rectangle(x, y, width, height);
	}
	
	public abstract void update(int delta);
	
	public abstract void draw(Graphics g);
	
	public boolean isCollisionWith(Entity other) {
		return bounds.intersects(other.bounds);
	}
	
	public boolean collidedWith(Entity entity) {
		return false;
	}
}
